package exceptionHomework;

import java.io.FileOutputStream;
import java.io.IOException;

public class AtuoCloseableDemo2 {
    public static void main(String[] args) {
        System.out.println("程序开始了...");
        try(FileOutputStream fos=new FileOutputStream("fos.dat")){
            fos.write(5);
        }catch (IOException e){
            e.printStackTrace();
        }
        System.out.println("程序结束了");
    }
}
